package com.android.infantschool.ui.activity;

import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.ImageView;

import com.android.infantschool.R;
import com.android.infantschool.model.config.AppConfig;
import butterknife.BindView;
import butterknife.ButterKnife;
import cn.bingoogolapple.bgabanner.BGABanner;
import cn.bingoogolapple.bgabanner.BGALocalImageSize;

/**
 * author:Administrator
 * Date:2019/7/29 0029
 * Description:
 */
public class WelcomeGuideActivity extends BaseActivity implements View.OnClickListener {

    @BindView(R.id.banner_guide_content)
    public BGABanner bannerGuideContent;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_guide);
        Log.e(TAG,"onCreate...");
        ButterKnife.bind(this);
        // Bitmap 的宽高在 maxWidth maxHeight 和 minWidth minHeight 之间
        BGALocalImageSize localImageSize = new BGALocalImageSize(720, 1280, 320, 640);
        // 设置数据源
        bannerGuideContent.setData(localImageSize, ImageView.ScaleType.CENTER_CROP,
                R.mipmap.splash_1,
                R.mipmap.splash_2,
                R.mipmap.splash_3);

        bannerGuideContent.setEnterSkipViewIdAndDelegate(R.id.img_at_once, 0, new BGABanner.GuideDelegate() {
            @Override
            public void onClickEnterOrSkip() {
                startActivity(new Intent(WelcomeGuideActivity.this, SplashActivity.class));
                AppConfig.setIsWelCome(true);
                finish();
            }
        });
    }

    @Override
    protected void onResume() {
        super.onResume();
    }

    @Override
    protected void onPause() {
        super.onPause();
    }

    @Override
    protected void onStop() {
        super.onStop();
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
    }

    @Override
    public void onClick(View v) {

    }

}